﻿<core:ViewBase x:Class="DXTools.UI.Shell.MainShellView"
    xmlns:core="clr-namespace:DXTools.UI.Core.View;assembly=DXTools.UI.Core"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:converters="clr-namespace:DXTools.UI.Core.Converters;assembly=DXTools.UI.Core"
    xmlns:Regions="http://www.codeplex.com/prism"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    </UserControl.Resources>
    <StackPanel Orientation="Vertical" >
        <Border CornerRadius="5" BorderThickness="1" BorderBrush="DarkGray" Margin="2">
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="#DFECF7" Offset="0.0" />
                    <GradientStop Color="#D3E0F1" Offset="0.26" />
                    <GradientStop Color="#C7D8ED" Offset="0.26"/>
                    <GradientStop Color="#D8E8F5" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <StackPanel Orientation="Horizontal">
                <sdk:TabControl Name="TabControlToolbarRegion" Background="Transparent"
            Regions:RegionManager.RegionName="ToolbarRegion" BorderThickness="1"
            Grid.Row="1" Margin="2">
                    <Regions:TabControlRegionAdapter.ItemContainerStyle>
                        <Style TargetType="sdk:TabItem">
                            <Setter Property="HeaderTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        
                                        <TextBlock  
                                    Text="{Binding HeaderInfo}" 
                                    FontSize="12" VerticalAlignment="Center" />
                                     
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </Regions:TabControlRegionAdapter.ItemContainerStyle>
                </sdk:TabControl>
            </StackPanel>
        </Border>
        <Grid Margin="2,0,2,2">
            <Border CornerRadius="5" BorderThickness="1" BorderBrush="DarkGray">
                <Border.Background>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="#C7D8ED" Offset="0.26"/>
                        <GradientStop Color="#D8E8F5" Offset="1" />
                    </LinearGradientBrush>
                </Border.Background>
                <sdk:TabControl Name="TabControlBodyRegion"
            Regions:RegionManager.RegionName="BodyRegion"
            Grid.Row="1" Margin="2">
                    <Regions:TabControlRegionAdapter.ItemContainerStyle>
                        <Style TargetType="sdk:TabItem">
                            <Setter Property="HeaderTemplate">
                                <Setter.Value>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock  
                                        Text="{Binding HeaderInfo}" 
                                        FontSize="12" VerticalAlignment="Center" />
                                            <Button Width="15" Height="15" Margin="7,0,0,0" Style="{StaticResource TabCloseButtonStyle}" Command="{Binding CloseViewCommand}" HorizontalAlignment="Right">
                                                <Button.Content>
                                                    <Image Margin="-1" Source="Images/close.png" Stretch="UniformToFill"/>
                                                </Button.Content>
                                            </Button>
                                        </StackPanel>
                                    </DataTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </Regions:TabControlRegionAdapter.ItemContainerStyle>
                </sdk:TabControl>
            </Border>
            <Rectangle Name="WelcomeImage" Visibility="{Binding ShowWelcomeImage, Converter={StaticResource BooleanToVisibilityConverter}}">
                <Rectangle.Fill>
                    <ImageBrush ImageSource="../Images/logo.png" Stretch="None" AlignmentX="Center" AlignmentY="Center"/>
                </Rectangle.Fill>
            </Rectangle>
        </Grid>
    </StackPanel>
</core:ViewBase>
